<?php
	require_once(dirname(__FILE__)."/classes/incluir.php"); // para incluir as classe do projeto deve ser dessa maneira
	
	$area = "Login"; // Entra no titulo
	
	$site = new Site();
	if($_POST)
	{
		// Tenta logar com os dados do post e usando a tabela Gerente, se conseguir volta para a index
		$site->login->logar(array(0 => './', 1 => './adm/'), $_POST, 'Gerente');
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		
		<script src="./js/jquery/jquery.js" type="text/javascript"></script>
		<!-- Load TinyMCE -->
		<script type="text/javascript" src="./js/jquery/jquery.tinymce.js"></script>
		
		<link rel="stylesheet" type="text/css" href="./css/style.css" />
		
		<title><?echo $projeto_nome;?> - <?echo $area;?></title>
	</head>
	<body>
		<?php $site->paginacao->header();?>
		<?php $site->session->print_session_msg(); ?>
		
		<?php $site->print_erro($site->login->erros['logar']);?>
		<form method="post" action="">
			<fieldset>
				<label for="login">Login:</label> <br />
				<input type="text" id="login" name="login" value="<?php echo $_POST['login'];?>" /> <br />
				<?php $site->print_erro($site->login->erros['login']); ?>
					
				<label for="senha">Senha:</label> <br />
				<input type="password" id="senha" name="senha" /> <br />
				<?php $site->print_erro($site->login->erros['senha']); ?>
				
				<input type="submit" id="logar" value="Logar" />
			</fieldset>
		</form>
		
		<?php $site->paginacao->footer();?>		
	</body>
</html>